package com.learn.annotation_config.conditional;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan
public class ConditionalApplication {
    public static void main(String[] args) {
        System.setProperty("registerAllBean", "false");
        
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConditionalApplication.class);
        System.out.println(applicationContext.getBean("userDao"));
        System.out.println(applicationContext.getBean("userService"));
    }
}
